package com.gaofeng.day19;

import java.util.TreeMap;

public class demo08 {
    public static void main(String[] args) {
        String s = "acbasdbasbdscsdcadasdcd";
        TreeMap<Character, Integer> tm = new TreeMap<>();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            System.out.println(c);
            if(tm.containsKey(c)){
                tm.put(c,tm.get(c)+1);
            }else{
                tm.put(c,1);
            }
        }
        System.out.println(tm);
    }
}
